< previous page page_556 next page >

Page 556
e10a6a0a59f035e870d90cca05b85fce.gif
Dim z0 As Single 
Dim x1 As Single 
Dim y1 As Single 
Dim z1 As Single 
Dim x2 As Single 
Dim y2 As Single 
Dim z2 As Single 
Dim x3 As Single 
Dim y3 As Single 
Dim z3 As Single 

    If IsMissing(cap_ends) Then cap_ends = True 
     
    Set solid = New Solid3d 
     
    ' Add the base curve to solid assuming the 
    ' curve is stored oriented towards the 
    ' transformations. 
    If cap_ends Then 
        Set face = New Face3d 
        solid.Faces.Add face 
        For i = NumCurvePts - 1 To 1 Step -1 
            face.AddPoints _
                CurvePoints(i).coord(1), _ 
                CurvePoints(i).coord(2), _ 
                CurvePoints(i).coord(3) 
        Next i 
    End If 
     
    ' Start with the transformed coordinates 
    ' the same as the original coordinates. 
    For i = 1 To NumCurvePts 
        CurvePoints(i).trans(1) = CurvePoints(i).coord(1) 
        CurvePoints(i).trans(2) = CurvePoints(i).coord(2) 
        CurvePoints(i).trans(3) = CurvePoints(i).coord(3) 
    Next i

    ' Create the transformed copies of the curve. 
    For i = 1 To NumTrans 
        x0 = CurvePoints(1).trans(1)
        y0 = CurvePoints(1).trans(2)
        z0 = CurvePoints(1).trans(3)
        m3ApplyFull _
            CurvePoints(1).coord, trans(i).M, _
            CurvePoints(1).trans
        x1 = CurvePoints(1).trans(1)
        y1 = CurvePoints(1).trans(2)
        z1 = CurvePoints(1).trans(3)

        For j = 2 To NumCurvePts 
            x2 = CurvePoints(j).trans(1)

 
< previous page page_556 next page >